<?php
/*
 *  A Part of snock project
 *   Author king-of-war
 * Last modified 2009-4-20
 *
 */
@session_start();
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
 $root_path='../';   //set the root path for this file
 include_once $root_path.'admin/class/sort.class.php';
include_once $root_path.'admin/smarty_config.php';
include_once $root_path.'admin/class/error.class.php';
 $sort=new sort($root_path);
$error=new Errmsg();

/*
 *
 * check identify
 */
include_once $root_path.'admin/class/verify.class.php';
$a=new verify($root_path);
$a->identity_check(2);
 /*
  * $fun: 1 means add sort
  * $fun: 0 means update sort
  */
  if($_POST['submit']=='提交'){
 $title=$_POST['title'];

 $intro=$_POST['intro'];
 $line=$sort->sort_add('null',$title,$intro,'1');

if($line){
$info = '分类添加成功';
$error->error_chinese($info);
exit;
}else{
$info = '分类添加失败';
$error->error_chinese($info);
	exit;
}


  }
 $smarty->display("sort_add.html");
?>
